#include "MySQLConnector.h"
#include <iostream>
using std::endl;
using std:: cout;
int main(int argc, char *argv[])
{
    MySQLConnector *mysqlInstance = MySQLConnector::getInstance();
    bool ret = mysqlInstance->connect("127.0.0.1", 
                                      "root", "1234", "wangdao");

    mysqlInstance->query("select * from user where name = 'lwj'");
    MYSQL_RES* res = mysqlInstance->getResult();
    int num_fields = mysql_num_fields(res);
    MYSQL_ROW row;
      while ((row = mysql_fetch_row(res))) {
        for(int i = 0; i < num_fields; i++) {
            printf("%s ", row[i] ? row[i] : "NULL");
        }
        printf("\n");
    }
    cout << "main.cpp 18" << endl;
    mysqlInstance->destory();
    Logger::destroy();

}

